import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standard_home_target_resp_entity.dart';

StandardHomeTargetRespEntity $StandardHomeTargetRespEntityFromJson(Map<String, dynamic> json) {
  final StandardHomeTargetRespEntity standardHomeTargetRespEntity = StandardHomeTargetRespEntity();
  final int? departmentCount = jsonConvert.convert<int>(json['departmentCount']);
  if (departmentCount != null) {
    standardHomeTargetRespEntity.departmentCount = departmentCount;
  }
  final int? departmentCountPracticable = jsonConvert.convert<int>(json['departmentCountPracticable']);
  if (departmentCountPracticable != null) {
    standardHomeTargetRespEntity.departmentCountPracticable = departmentCountPracticable;
  }
  final int? positionCount = jsonConvert.convert<int>(json['positionCount']);
  if (positionCount != null) {
    standardHomeTargetRespEntity.positionCount = positionCount;
  }
  final int? positionCountPracticable = jsonConvert.convert<int>(json['positionCountPracticable']);
  if (positionCountPracticable != null) {
    standardHomeTargetRespEntity.positionCountPracticable = positionCountPracticable;
  }
  return standardHomeTargetRespEntity;
}

Map<String, dynamic> $StandardHomeTargetRespEntityToJson(StandardHomeTargetRespEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['departmentCount'] = entity.departmentCount;
  data['departmentCountPracticable'] = entity.departmentCountPracticable;
  data['positionCount'] = entity.positionCount;
  data['positionCountPracticable'] = entity.positionCountPracticable;
  return data;
}

extension StandardHomeTargetRespEntityExtension on StandardHomeTargetRespEntity {
  StandardHomeTargetRespEntity copyWith({
    int? departmentCount,
    int? departmentCountPracticable,
    int? positionCount,
    int? positionCountPracticable,
  }) {
    return StandardHomeTargetRespEntity()
      ..departmentCount = departmentCount ?? this.departmentCount
      ..departmentCountPracticable = departmentCountPracticable ?? this.departmentCountPracticable
      ..positionCount = positionCount ?? this.positionCount
      ..positionCountPracticable = positionCountPracticable ?? this.positionCountPracticable;
  }
}
